<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Registration Page</title>
    </h:head>
    <h:body>
        <ui:composition template="./templateuser.xhtml">
            <ui:define name="center">
                <h:form>
                    <p:panel header="Change Password">
                        <h:panelGrid columns="3" id="passwordGrid">

                            <h:outputLabel for="password">Password:</h:outputLabel>
                            <p:password id="password" value="#{modifyProfileBean.user.password}"
                                        feedback="true" match="pwd2" label="Password"/>
                            <p:message for="password" />

                            <h:outputLabel for="pwd2">Confirm Password:</h:outputLabel>
                            <p:password id="pwd2" label="Confirm Password"/>
                        </h:panelGrid>
                        
                        <p:toolbar style="margin-top: 20px">
                            <p:toolbarGroup align="right">
                                <p:commandButton value="Change" update="passwordGrid"
                                 action="#{modifyProfileBean.save()}" />
                            </p:toolbarGroup>
                        </p:toolbar>
                        
                        
                    </p:panel>
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
